﻿#region License statement
// NJamb, a specification and delta-specification DSL
// Copyright (c) 2010-2011, Mark Knell
// Published under the MIT License; all other rights reserved
#endregion

#region using...
using System;
using NUnit.Framework;
using Stile.NUnit;
using Stile.Patterns.SelfDescribingPredicates;
#endregion

namespace NJamb.NUnit
{
    [TestFixture]
    public abstract class EvaluatingSampleFixture : SampleFixture
    {
        protected static void AssertEvaluationFailed(IEvaluation evaluation, string message1, string message2 = null)
        {
            Assert.That(evaluation.Success, Is.False, "Outcome should be false");
            string message = message2 == null ? message1 : message1 + Environment.NewLine + message2;
            Assert.That(evaluation.Reason, Is.EqualTo(message));
        }
    }
}
